<?php
namespace Admin\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
        $this->display();
    }

    public function adminUserAdd(){
    $this->display();
}


//        $menuModel = M('Roleuser');
//        $uid = session("user");
//        $id = $uid['ID'];
//        //        SELECT sysmodule.* FROM sysroleuser
//        //        LEFT JOIN sysroleauth ON sysroleauth.rid = sysroleuser.rid
//        //        LEFT JOIN sysmodule ON sysroleauth.mid = sysmodule.ID
//        //        WHERE uid = 1 ORDER BY sysmodule.ID;
//        //        $data = $menuModel->where(array('ParentID'=>$pid))->select();
//        $data = $menuModel->join('sysroleauth ON sysroleauth.rid = sysroleuser.rid','LEFT')
//            ->join('sysmodule ON sysroleauth.mid = sysmodule.ID','LEFT')
//            ->field('sysmodule.*')
//            ->where('uid = 1')
//            ->order('sysmodule.ID')->select();
////        var_dump($data);
//        $newArr = array();
//        foreach($data as $key => $menu){
//            if($menu['ParentID']==0){
//                $newArr[$menu['ID']] = $menu;
//                unset($data[$key]);
//            }
//        }
//        foreach ($data as $childMenu){
//            $newArr[$childMenu['ParentID']]['child'][] = $childMenu;
//        }
//
//        $menuList = '';
//        foreach ($newArr as $menuHtml){
//            $menuList .= '<div title="'.$menuHtml['Name'].'" style="padding:10px 20px;">';
//            if (!empty($menuHtml['child'])){
//                foreach ($menuHtml['child'] as $childMenuHtml){
//                    $menuList .= '<a href="'.U($childMenuHtml['Url']).'" target="mainFrame">'.$childMenuHtml['Name'].'</a>';
//                }
//            }
//            $menuList .= '</div>';
//        }
//        $this->assign('MENU_LIST',$menuList);
//
//
////        $tree = new \Common\Controller\TreeController();
////        $menuList = $tree->getMenuList();
////        $this->assign('MENU_LIST',$menuList);
//        $this->display();
//    }
}